Optimal. Leaf size=371 \[ \frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b d \left (a^2+b^2\right ) (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b-2 a^3 B-4 a b^2 B+3 A b^3\right ) \tan ^2(c+d x)}{b^2 d \left (a^2+b^2\right )^2 \sqrt{a+b \tan (c+d x)}}-\frac{2 \left (4 a^3 A b-15 a^2 b^2 B-8 a^4 B+10 a A b^3-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 d \left (a^2+b^2\right )^2}+\frac{2 \left (17 a^2 A b^3+8 a^4 A b-30 a^3 b^2 B-16 a^5 B-8 a b^4 B+3 A b^5\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 d \left (a^2+b^2\right )^2}-\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{5/2}}+\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.04536, antiderivative size = 371, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 8, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.242, Rules used = {3605, 3645, 3647, 3630, 3539, 3537, 63, 208} \[ \frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b d \left (a^2+b^2\right ) (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b-2 a^3 B-4 a b^2 B+3 A b^3\right ) \tan ^2(c+d x)}{b^2 d \left (a^2+b^2\right )^2 \sqrt{a+b \tan (c+d x)}}-\frac{2 \left (4 a^3 A b-15 a^2 b^2 B-8 a^4 B+10 a A b^3-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 d \left (a^2+b^2\right )^2}+\frac{2 \left (17 a^2 A b^3+8 a^4 A b-30 a^3 b^2 B-16 a^5 B-8 a b^4 B+3 A b^5\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 d \left (a^2+b^2\right )^2}-\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{5/2}}+\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3605
Rule 3645
Rule 3647
Rule 3630
Rule 3539
Rule 3537
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{5/2}} \, dx &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 \int \frac{\tan ^2(c+d x) \left (-3 a (A b-a B)+\frac{3}{2} b (A b-a B) \tan (c+d x)-\frac{3}{2} \left (a A b-2 a^2 B-b^2 B\right ) \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^{3/2}} \, dx}{3 b \left (a^2+b^2\right )}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{4 \int \frac{\tan (c+d x) \left (-3 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right )-\frac{3}{4} b^2 \left (a^2 A-A b^2+2 a b B\right ) \tan (c+d x)-\frac{3}{4} \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx}{3 b^2 \left (a^2+b^2\right )^2}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}+\frac{8 \int \frac{\frac{3}{4} a \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right )-\frac{9}{8} b^3 \left (2 a A b-a^2 B+b^2 B\right ) \tan (c+d x)+\frac{3}{8} \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \tan ^2(c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{9 b^3 \left (a^2+b^2\right )^2}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 \left (a^2+b^2\right )^2 d}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}+\frac{8 \int \frac{\frac{9}{8} b^3 \left (a^2 A-A b^2+2 a b B\right )-\frac{9}{8} b^3 \left (2 a A b-a^2 B+b^2 B\right ) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{9 b^3 \left (a^2+b^2\right )^2}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 \left (a^2+b^2\right )^2 d}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}+\frac{(A-i B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a-i b)^2}+\frac{(A+i B) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a+i b)^2}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 \left (a^2+b^2\right )^2 d}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}-\frac{(i A-B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b)^2 d}+\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b)^2 d}\\ &=\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 \left (a^2+b^2\right )^2 d}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b (i a+b)^2 d}+\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(i a-b)^2 b d}\\ &=-\frac{(i A+B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{5/2} d}+\frac{(i A-B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{5/2} d}+\frac{2 a (A b-a B) \tan ^3(c+d x)}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right ) \tan ^2(c+d x)}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (8 a^4 A b+17 a^2 A b^3+3 A b^5-16 a^5 B-30 a^3 b^2 B-8 a b^4 B\right ) \sqrt{a+b \tan (c+d x)}}{3 b^4 \left (a^2+b^2\right )^2 d}-\frac{2 \left (4 a^3 A b+10 a A b^3-8 a^4 B-15 a^2 b^2 B-b^4 B\right ) \tan (c+d x) \sqrt{a+b \tan (c+d x)}}{3 b^3 \left (a^2+b^2\right )^2 d}\\ \end{align*}
Mathematica [C] time = 6.3233, size = 450, normalized size = 1.21 \[ \frac{2 B \tan ^3(c+d x)}{3 b d (a+b \tan (c+d x))^{3/2}}+\frac{2 \left (\frac{3 (A b-2 a B) \tan ^2(c+d x)}{b d (a+b \tan (c+d x))^{3/2}}+\frac{2 \left (\frac{3 \left (-8 a^2 B+4 a A b+b^2 B\right ) \tan (c+d x)}{2 b d (a+b \tan (c+d x))^{3/2}}-\frac{3 \left (-\frac{2 \left (8 a^2 A b-16 a^3 B+2 a b^2 B+A b^3\right )}{3 b (a+b \tan (c+d x))^{3/2}}+\frac{2 \left (\frac{\left (\frac{3}{2} a b^4 B-\frac{3 A b^5}{2}\right ) \left (\frac{\text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},\frac{a+b \tan (c+d x)}{a+i b}\right )}{3 (-b+i a) (a+b \tan (c+d x))^{3/2}}-\frac{\text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},\frac{a+b \tan (c+d x)}{a-i b}\right )}{3 (b+i a) (a+b \tan (c+d x))^{3/2}}\right )}{b}-\frac{3}{2} b^3 B \left (\frac{\text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a+i b}\right )}{(-b+i a) \sqrt{a+b \tan (c+d x)}}-\frac{\text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a-i b}\right )}{(b+i a) \sqrt{a+b \tan (c+d x)}}\right )\right )}{3 b}\right )}{4 b d}\right )}{b}\right )}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.137, size = 12953, normalized size = 34.9 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{4}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]